package org.jsola.hr.web;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.jsola.core.Page;
import org.jsola.core.Result;
import org.jsola.hr.dto.ApplyToProgAddDTO;
import org.jsola.hr.dto.ApplyToProgEmpeeInfoDTO;
import org.jsola.hr.dto.ApplyToProgUpdateDTO;
import org.jsola.hr.query.ApplyToProgQuery;
import org.jsola.hr.vo.ApplyToProgListVO;
import org.jsola.hr.vo.ApplyToProgVO;

import java.util.List;

/**
 * @author zhr
 */
@Api(tags = "hr-方案适用设置")
public interface IApplyToProgControllerAPI {

    /**
     * 新增方案适用设置
     * @param applyToProgAddDTO 方案适用设置新增实体
     * @return 方案适用设置展示对象
     */
    @ApiOperation(value = "新增方案适用设置")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "applyToProgAddDTO", dataType = "ApplyToProgAddDTO", value = "新增方案适用设置", paramType = "body")
    })
    Result<ApplyToProgVO> save(ApplyToProgAddDTO applyToProgAddDTO);


    /**
     * 新增方案适用设置
     * @param applyToProgAddDTO 方案适用设置新增实体
     * @return 方案适用设置展示对象
     */
    @ApiOperation(value = "新增方案适用设置")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "applyToProgAddDTO", dataType = "ApplyToProgAddDTO", value = "新增方案适用设置", paramType = "body")
    })
    Result<Object> add(ApplyToProgAddDTO applyToProgAddDTO);

    /**
     * 修改方案适用设置
     * @param applyToProgUpdateDTO 方案适用设置
     * @return 更新数量
     */
    @ApiOperation(value = "修改方案适用设置")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "applyToProgUpdateDTO", dataType = "ApplyToProgUpdateDTO", value = "修改方案适用设置", paramType = "body")
    })
    Result<Object> update(ApplyToProgUpdateDTO applyToProgUpdateDTO);




    /**
     * 删除单个方案适用设置，彻底删除
     * @param applyToProgId 方案适用设置id
     * @return 删除数量
     */
    @ApiOperation(value="删除单个方案适用设置，彻底删除")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "applyToProgId", dataType = "String", value = "方案适用设置id", paramType = "path")
    })
    Result<Integer> delete(String applyToProgId);


    /**
     * 批量删除方案适用设置，彻底删除
     * @param applyToProgIds 方案适用设置id集合
     * @return 删除数量
     */
    @ApiOperation(value = "批量删除方案适用设置，彻底删除")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "applyToProgIds", dataType = "String[]", value = "方案适用设置id数组", paramType = "body" ,allowMultiple = true)
    })
    Result<Integer> deleteBatch(String[] applyToProgIds);


    /**
     * 根据方案适用设置id查询方案适用设置详情
     * @param applyToProgId 方案适用设置id
     * @return 方案适用设置详情
     */
    @ApiOperation(value="根据方案适用设置id查询方案适用设置详情")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "applyToProgId", dataType = "String", value = "方案适用设置id", paramType = "path")
    })
    Result<ApplyToProgVO> findById(String applyToProgId);

    /**
     * 根据业务方案id查询方案设用设置
     * @param busProgId 业务方案id
     * @return 方案适用设置详情
     */
    @ApiOperation(value="根据业务方案id查询方案设用设置")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "busProgId", dataType = "String", value = "业务方案id", paramType = "path")
    })
     Result<ApplyToProgVO> findByBusProgId(String busProgId);

    /**
     * 查询方案适用设置
     * @param applyToProgQuery 方案适用设置查询参数
     * @return page
     */
    @ApiOperation(value="查询方案适用设置")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "applyToProgQuery", dataType = "ApplyToProgQuery", value = "方案适用设置查询参数", paramType = "query")
    })
    Result<List<ApplyToProgListVO>> listAll(ApplyToProgQuery applyToProgQuery);


     /**
     * 分页查询方案适用设置
     * @param applyToProgQuery 方案适用设置查询参数
     * @return page
     */
    @ApiOperation(value="分页查询方案适用设置")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "applyToProgQuery", dataType = "ApplyToProgQuery", value = "方案适用设置查询参数", paramType = "query")
    })
    Result<Page<ApplyToProgListVO>> page(ApplyToProgQuery applyToProgQuery);

    /**
     * 查询当前方案适用员工
     * @param busProgType 业务方案类型
     * @return 方案适用员工id
     */
    @ApiOperation(value="查询当前方案适用员工")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "busProgType", dataType = "string", value = "业务方案类型", paramType = "query"),
    })
    Result<List<ApplyToProgEmpeeInfoDTO>> getApplyToProgEmployee(String busProgType, String companyId);
}

